#ifndef CHESSBOARDWIDGET_H
#define CHESSBOARDWIDGET_H

#include"QWidget.h"
#include"Observer.h"

class QMouseEvent;
class QPaintEvent;
class QPoint;
class Chess;
class ChessBoard;

class ChessBoardWidget : public QWidget,public Observer{
    Q_OBJECT
public:
    ChessBoardWidget(QWidget* parent):QWidget(parent){

    }

    void update(GameActivity*);
    void setChessBoard(ChessBoard*);
    ChessBoard* getChessBoard(){
        return chessBoard;
    }
protected:

private:
    void mousePressEvent(QMouseEvent *);
    void paintEvent(QPaintEvent *);
    ChessBoard* chessBoard;
signals:
    void mouseClicked(int,int);
};

#endif // CHESSBOARD_H
